home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / programm / prog_a2m / fast_txt / fast_txt.gfa (.txt) < prev   
GFA-BASIC Atari  |  1995-05-02  |  2KB  |  72 lines

  1. ' The original FAST TEXT OUTPUT program from "Prog. w/ GFA 3.0" book modified
  2. ' to work with medium resoloution.  It was _NOT_ modified by me.
  3. '
  4. ' This works very well.  You first have to call the INIT routine to set things
  5. ' up.  Then, you can call the PRINT routine and pass it the string you want
  6. ' to print onto the screen, followed by the line number you want it placed on.
  7. '
  8. ' Please note that this only works on medium resoloutions.  Also, refer to the
  9. ' above book for some specific information on this routine.
  10. '
  11. ' If there are any questions or problems, leave me a note.
  12. '
  13. ' -Hagop Janoyan      GEnie: H.JANOYAN3
  14. '
  15. @init
  16. FOR i%=0 TO 24
  17.   @print("Print on line "+STR$(i%),i%)
  18. NEXT i%
  19. '
  20. > PROCEDURE init
  21.   LOCAL xb2%,r%,line%
  22. ' ## INLINE:
  23. ' $0000: 0c 14 00 00 67 00 00 38 2c 4b 9c 86 1c 1c cc fc 
  24. ' $0010: 00 08 dd c6 3e 3c 00 07 1a 96 1b 5e 00 02 db fc 
  25. ' $0020: 00 00 00 a0 51 cf ff f2 9b fc 00 00 04 ff 3e 0d 
  26. ' $0030: 08 07 00 00 66 00 ff ca 54 4d 60 00 ff c4 4e 75 
  27. ' 64  Bytes.
  28.   INLINE asm_text_color3%,64
  29.   '
  30. ' ## INLINE:
  31. ' $0000: 48 e7 03 1e 26 6f 00 1c 28 6f 00 20 2a 6f 00 24 
  32. ' $0010: 2e 2f 00 28 ce fc 05 00 2c 2f 00 2c dc 86 dc 87 
  33. ' $0020: db c6 0c 14 00 00 67 00 00 38 2c 4b 9c 86 1c 1c 
  34. ' $0030: cc fc 00 08 dd c6 3e 3c 00 07 1a 96 1b 5e 00 02 
  35. ' $0040: db fc 00 00 00 a0 51 cf ff f2 9b fc 00 00 04 ff 
  36. ' $0050: 3e 0d 08 07 00 00 66 00 ff ca 54 4d 60 00 ff c4 
  37. ' $0060: 4c df 78 c0 4e 75 
  38. ' 102  Bytes.
  39.   INLINE ctext_asm%,102
  40.   '
  41.   xb2%=XBIOS(2)
  42.   DIM font%(2048/4)      ! Storage space for character set
  43.   adr_font%=V:font%(0)    ! Address of the character set
  44.   a%=adr_font%
  45.   '                  Here is an example of STANDARD text
  46.   height%=6
  47.   FOR cnt%=0 TO 255
  48.     r%=xb2%
  49.     TEXT 0,6,CHR$(cnt%)
  50.     FOR line%=0 TO 7
  51.       POKE a%,PEEK(r%)
  52.       ADD r%,160
  53.       INC a%
  54.     NEXT line%
  55.   NEXT cnt%
  56.   CLS
  57. RETURN
  58. > PROCEDURE print(print_char$,fast_line%)
  59.   LOCAL xb2%
  60.   print_char$=print_char$+CHR$(0)    ! the asm sub will output text until it finds a 0
  61.   adr_string%=V:print_char$         ! Address of the Text String
  62.   IF DIM?(reg%())<>0
  63.     DIM reg%(16)             ! Register array
  64.   ENDIF
  65.   '
  66.   asm_adr#=ctext_asm%
  67.   '
  68.   xb2%=XBIOS(2)
  69.   '
  70.   ~C:asm_adr#(L:adr_font%,L:adr_string%,L:xb2%,L:fast_line%,L:columns%)
  71. RETURN
  72.